#include "RenzoMustHave.h"
#include "RenzoTestMain.h"
#include "RenzoUtil.h"

namespace Renzo
{
void rzTestLargeArray() {
	long size;

	//
	// 1D array 
	// 
	size = 1000000;	
	float* a = (float*) malloc(sizeof(float) * size);
	
	rzClockInit();
	// use index to write
	for (long i = 0; i < size; ++i) {
		a[i] = (float)i;
	}
	rzClockTick();

	// use index to read	
	for (long i = 0; i < size; ++i) {
		float t = a[i];
	}
	rzClockTick();

	// use pointer to write
	float* pA = a;
	for (long i = 0; i < size; ++i) {
		*pA = (float)i;
		++pA;
	}
	rzClockTick();

	// use pointer to read
	pA = a;
	for (long i = 0; i < size; ++i) {
		float t = *pA;
		++pA;
	}
	rzClockTick();
	free(a);

	//
	// 2D array test
	//

}

}